import { axios } from '@/utils/request'

export function getTree (number) {
  return axios({
    url: '/productBom/tree/' + number,
    method: 'GET'
  })
}

export function addObj (obj) {
  return axios({
    url: '/productBom/add',
    method: 'POST',
    data: obj
  })
}

export function putObj (obj) {
  return axios({
    url: '/productBom/update',
    method: 'PUT',
    data: obj
  })
}

export function delObj (id) {
  return axios({
    url: '/productBom/' + id,
    method: 'DELETE'
  })
}

export function getObj (id) {
  return axios({
    url: '/productBom/info/' + id,
    method: 'GET'
  })
}
